package com.zhuss.core.db.dao.ext;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zhuss.core.db.dao.gen.ScheduleMapper;
import com.zhuss.core.db.entity.Schedule;

@Mapper
public interface ScheduleDao extends ScheduleMapper {
	
	void create(Schedule schedule);

	Schedule getByTime(@Param("time") Date time, @Param("end") Date end, @Param("area") Integer area);
	
	Schedule getByFoodTime(@Param("date") Date date, @Param("foodTime") Integer foodTime, @Param("area") Integer area);

	List<Schedule> list(@Param("date") Date date, @Param("area") Integer area);
	
	Integer used(@Param("time") Date time, @Param("count") Integer count, @Param("area") Integer area);
	
	Integer usedFoodTime(@Param("date") Date date, @Param("foodTime") Integer foodTime, @Param("count") Integer count, @Param("area") Integer area);

	
}